import React from 'react';
import { Link, History } from 'react-router';
import classNames from 'classnames';

class Pager extends React.Component {

  constructor() {
    super();
  }

  static propTypes = {
      
  }

  static defaultProps = {
      
  }

  render() {

    let { onPageClick, children, enabled = false, status } = this.props;

    return(
        <div className="pager">
            <div className="text-center">
              {
                status === 0?
                `加载中`
                :
                enabled === true ?
                <a onClick={ onPageClick }>
                  {
                    children ? 
                    children
                    :
                    <span className="text-danger">
                      点击加载更多
                    </span>
                  }
                </a>
                : 
                `没有更多了`
              }
              
            </div>
        </div>
    )
  }
}

export default Pager;
